package com.shuany.test;

import java.io.Serializable;

/**
 * 使用memcached时，需将对象序列化
 * 
 * The client will by default NOT use java serialization, and instead
 * will serialize using the primitive values to save space. You can
 * override this by using the mcc.setPrimitiveAsString( true ), which
 * will use the toString representation of the object.
 * 
 * For other java objects, you need to make sure the class implements
 * Serializable in order to be able to be stored in the cache.
 * 
 * I would also reccomend that if possible, classes should instead
 * implement Externalizable as opposed to Serializable. This allows the
 * author of the class to define how objects of that class should
 * serialize. In practice at Meetup.com, we saw a 60% reduction in the size
 * of our serialized objects by doing this. This means less data to eat up
 * cache space and less data to transfer over the network.
 * 
 * @author yushan
 * @version 1.0
 */
public class Person implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    private String firstName;
    private String lastName;
    private double height;
    private double weight;
    private int sex;
    private boolean isStudent;

    public Person() {

    }

    public Person(String firstName, String lastName, double height, double weight, int sex, boolean isStuden) {
        this.firstName = firstName;
        this.lastName = lastName;
        this.height = height;
        this.weight = weight;
        this.sex = sex;
        this.isStudent = isStuden;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public boolean isStudent() {
        return isStudent;
    }

    public void setStudent(boolean isStudent) {
        this.isStudent = isStudent;
    }

}
